/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.ts.manager.impl;

import java.util.Collection;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xy.biz.ts.domain.bo.ExaminationTrainRelBO;
import com.xy.biz.ts.domain.query.ExaminationTrainRelQuery;
import com.xy.biz.ts.domain.converter.ExaminationTrainRelConverter;
import com.xy.biz.ts.manager.ExaminationTrainRelManager;
import com.xy.biz.ts.dao.ExaminationTrainRelDao;

/**
 *
 *
 * @author zgy
 * @date 2021-7-8
 */
@Service
public class ExaminationTrainRelManagerImpl implements ExaminationTrainRelManager {

	@Autowired
	private ExaminationTrainRelDao examinationTrainRelDao;

	@Override
	public int saveExaminationTrainRel(ExaminationTrainRelBO examinationTrainRelBO) {
		return examinationTrainRelDao.saveExaminationTrainRel(ExaminationTrainRelConverter.toPO(examinationTrainRelBO));
	}

	@Override
	public int saveAllExaminationTrainRel(Collection<ExaminationTrainRelBO> collection) {
		return examinationTrainRelDao.saveAllExaminationTrainRel(ExaminationTrainRelConverter.toPO(collection));
	}

	@Override
	public int updateExaminationTrainRel(ExaminationTrainRelBO examinationTrainRelBO) {
		return examinationTrainRelDao.updateExaminationTrainRel(ExaminationTrainRelConverter.toPO(examinationTrainRelBO));
	}

	@Override
	public int disableExaminationTrainRel(ExaminationTrainRelBO examinationTrainRelBO) {
		return examinationTrainRelDao.disableExaminationTrainRel(ExaminationTrainRelConverter.toPO(examinationTrainRelBO));
	}

	@Override
	public int deleteExaminationTrainRel(Long examinationTrainRelId) {
		return examinationTrainRelDao.deleteExaminationTrainRel(examinationTrainRelId);
	}

	@Override
	public ExaminationTrainRelBO getExaminationTrainRel(Long examinationTrainRelId) {
		return ExaminationTrainRelConverter.fromPO(examinationTrainRelDao.getExaminationTrainRel(examinationTrainRelId));
	}

	@Override
	public ExaminationTrainRelBO getExaminationTrainRelByTrainId(Long trainId) {
		return ExaminationTrainRelConverter.fromPO(examinationTrainRelDao.getExaminationTrainRelByTrainId(trainId));
	}

	@Override
	public List<ExaminationTrainRelBO> listExaminationTrainRelById(Collection<Long> collection) {
		return ExaminationTrainRelConverter.fromPO(examinationTrainRelDao.listExaminationTrainRelById(collection));
	}

	@Override
	public List<ExaminationTrainRelBO> listExaminationTrainRel(ExaminationTrainRelQuery query) {
		return ExaminationTrainRelConverter.fromPO(examinationTrainRelDao.listExaminationTrainRel(query));
	}

	@Override
	public int countExaminationTrainRel(ExaminationTrainRelQuery query) {
		return examinationTrainRelDao.countExaminationTrainRel(query);
	}

}
